{$DEFINE DEBUG}
program SelfService_debugger;
{$APPTYPE GUI}

uses
  Vcl.Forms,
  Web.WebReq,
  System.IniFiles,
  System.SysUtils,
  IdHTTPWebBrokerBridge,
  FormUnit1 in 'FormUnit1.pas' {Form1},
  WebModuleUnit1 in 'WebModuleUnit1.pas' {WebModule1: TWebModule},
  selfserviceImpl in 'selfserviceImpl.pas',
  selfserviceIntf in 'selfserviceIntf.pas',
  NativeXml in 'NativeXml.pas',
  Unit_globle in 'Unit_globle.pas',
  Unit_SbClinicInterface in 'Unit_SbClinicInterface.pas',
  mz_function_dtm in 'mz_function_dtm.pas' {mz_function: TSoapDataModule},
  gh_com_FindPatient_dtm in 'gh_com_FindPatient_dtm.pas' {gh_com_FindPatient: TSoapDataModule},
  sf_com_HuaJia_dtm in 'sf_com_HuaJia_dtm.pas' {sf_com_HuaJia: TSoapDataModule};

{$R *.res}

var
  MyIniFile : TIniFile;
begin
  MyIniFile := TIniFile.Create(GetCurrentDir+'\SelfService.ini');
  gv_app_server := MyIniFile.ReadString('Server','AppServer','' );
  gv_mz_dept_no :=inttostr(MyIniFile.Readinteger('Chis','mz_dept_no',1));
  gv_user_mi := MyIniFile.ReadString('Chis','user_mi','00000');
  gv_round := MyIniFile.Readinteger('Chis','Round',100);
  case gv_round of
    100: gv_format := '#0.00';
    10: gv_format := '#0.0';
    1: gv_format := '#0';
    else gv_format := '#0.00'
  end;
  gv_autowin := Trim(MyIniFile.Readstring('Chis','auto_distribute_win','0'));
  gv_led_display := Trim(MyIniFile.Readstring('Chis','LED_DISPLAY','0'));
  gv_team_no := Trim(MyIniFile.ReadString('Chis', 'Team_No', '1'));
  MyIniFile.Free;
  InitSbClinicDll;

  if WebRequestHandler <> nil then
    WebRequestHandler.WebModuleClass := WebModuleClass;
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
